package timing.ukulele.common.bridge;

import java.util.Arrays;

public enum WeChatMethodEnum {
    MP_ACCESS_TOKEN("mp_access_token", "获取公众号access_token接口");
    private String method;
    private String description;

    WeChatMethodEnum(String method, String description) {
        this.method = method;
        this.description = description;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public static boolean hasMethod(String method) {
        return Arrays.stream(WeChatMethodEnum.values()).anyMatch(item -> item.getMethod().equals(method));
    }
}
